<template>
	<view class="index-warp">
		<MyHeaderVue></MyHeaderVue>
		<view class="head-box">
			<view class="profile-box">
				<view class="link">
					<view class="user-avatar-wrap">
						<view class="user-avatar">
							<image src="/static/0.png" mode="widthFix"></image>
						</view>
					</view>
					<view class="user-info">
						<view class="user-name">
							未登录~
						</view>
						<view class="user-member">

						</view>
					</view>

				</view>
			</view>
		</view>
		<view class="box">
			<view class="box-bd">
				<view class="item" v-for="item in bdList">
					<view class="img-wrap">
						<image :src="item.iconPath" mode="widthFix"></image>
					</view>
					<view class="title">
						{{item.title}}
					</view>
				</view>
			</view>
		</view>
		<view class="cart-section">
			<view class="section-left" @click="toShopCart">
				<view class="cart-large-name">
					购物车
				</view>
			</view>
			<view class="section-right">
				<view class="cart-item" v-for="item in cart_item">
					<view class="cart-item-name">
						{{item.name}}
					</view>
					<view class="cart-item-desc">
						{{item.desc}}
						<image src="/static/cart_item_right.png" mode="widthFix"></image>
					</view>
				</view>
			</view>
		</view>
		<view class="box">
			<view class="box-hd">
				<view class="box-title">
					我的订单
				</view>
				<view class="box-tools">
					全部
					<image src="/static/cart_item_right.png" mode="widthFix"></image>
				</view>
			</view>
			<view class="box-bd">
				<view class="item" v-for="item in order_item">
					<view class="img-wrap">
						<image :src="item.iconPath" mode="widthFix"></image>
					</view>
					<view class="title">
						{{item.title}}
					</view>
				</view>
			</view>
		</view>
		<view class="box">
			<view class="box-hd">
				<view class="box-title">
					我的设置
				</view>
			</view>
			<view class="box-bd">
				<view class="item" v-for="item in setting_item">
					<view class="img-wrap">
						<image :src="item.iconPath" mode="widthFix"></image>
					</view>
					<view class="title">
						{{item.title}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import MyHeaderVue from '../../components/MyHeader/MyHeader.vue';
	const bdList = ref([{
			iconPath: '/static/my_home.png',
			title: '我的主页'
		},
		{
			iconPath: '/static/my-message.png',
			title: '消息'
		},
		{
			iconPath: '/static/my_collect.png',
			title: '收藏'
		},
		{
			iconPath: '/static/my_user.png',
			title: '关注'
		}

	])
	const cart_item = ref([{
			name: '卡券红包',
			desc: '0张活动券'
		},
		{
			name: '补贴保障',
			desc: '退货补运费'
		},
		{
			name: '我的钱包',
			desc: '白付美在这'
		},
	])
	const order_item = ref([{
			title: '待付款',
			iconPath: '/static/my_payBag.png'
		},
		{
			title: '待发货',
			iconPath: '/static/my_fahuo.png'
		},
		{
			title: '待收货',
			iconPath: '/static/my_shouhuo.png'
		},
		{
			title: '评价',
			iconPath: '/static/my.png'
		},
		{
			title: '退款售后',
			iconPath: '/static/my_aaa.png'
		},
	])
	const setting_item = ref([{
			title: '签到',
			iconPath: '/static/qiandao.png'
		},
		{
			title: '大姨妈',
			iconPath: '/static/bigYima.png'
		},
		{
			title: '客服',
			iconPath: '/static/zhuangrengong.png'
		},
		{
			title: '达人中心',
			iconPath: '/static/superUser.png'
		},
	])
	const toShopCart = () => {
		uni.navigateTo({
			url: '/pages/shopCart/shopCart'
		})
	}
</script>

<style lang="scss" scoped>
	* {
		box-sizing: border-box;
	}

	.index-warp {
		padding-bottom: 100rpx;
	}

	.head-box {
		background: url('/static/mu_bg.png') 0 -44rpx no-repeat;
		background-size: 750rpx 229rpx;
		overflow: hidden;
		margin-bottom: 18rpx;

		.profile-box {
			margin: 90rpx auto 0;
			height: 252rpx;
			width: 702rpx;
			border-radius: 12rpx;
			background: #fff;
			position: relative;

			.link {
				.user-avatar-wrap {
					position: absolute;
					left: 50%;
					top: -66rpx;
					z-index: 98;
					margin-left: -66rpx;
					width: 132rpx;
					height: 132rpx;

					.user-avatar {
						border: 6rpx solid #fff;
						border-radius: 50%;
						overflow: hidden;
						width: 132rpx;
						height: 132rpx;

						image {
							width: 100%;
						}
					}
				}

				.user-info {
					width: 702rpx;
					text-align: center;
					padding-top: 83rpx;

					.user-name {
						font-size: 34rpx;
						line-height: 42rpx;
						font-weight: 700;
						display: flex;
						align-items: center;
						justify-content: center;
						color: #5e5e5e;
					}

					.user-member {
						background-image: url('/static/userCenter.png');
						position: absolute;
						bottom: 0;
						left: 0;
						width: 702rpx;
						height: 108rpx;
						background-size: 702rpx 108rpx;
						border-radius: 0 0 12rpx 12rpx;
					}
				}
			}
		}

	}

	.box {
		margin: 0 auto;
		width: 702rpx;
		border-radius: 12rpx;
		background: #fff;
		margin-bottom: 18rpx;

		.box-hd {
			margin: 0 auto;
			width: 654rpx;
			height: 80rpx;
			line-height: 80rpx;
			overflow: hidden;
			border-bottom: 1rpx solid #efefef;

			.box-title {
				float: left;
				font-size: 28rpx;
				color: #333;
			}

			.box-tools {
				float: right;
				display: flex;
				font-size: 22rpx;
				-webkit-box-align: center;
				-webkit-align-items: center;
				-moz-box-align: center;
				-ms-flex-align: center;
				align-items: center;

				image {
					width: 10rpx;
					height: 18rpx;
					margin-left: 7rpx;
				}
			}
		}

		.box-bd {
			display: flex;
			padding: 10rpx;
			flex-wrap: wrap;
			align-items: center;

			.item {
				display: flex;
				flex-direction: column;
				align-items: center;
				width: 100rpx;
				margin: 10rpx 18rpx;
				-webkit-box-orient: vertical;
				-webkit-box-direction: normal;

				.img-wrap {
					position: relative;
					width: 50rpx;
					height: 50rpx;
					margin: 6rpx;
				}

				.title {
					color: #5e5e5e;
					font-size: 24rpx;
				}
			}
		}
	}

	.cart-section {
		margin: 0 auto;
		width: 702rpx;
		display: flex;
		margin-bottom: 18rpx;
		justify-content: space-between;

		.section-left {
			background: url('/static/my_shopcart.png') 0 0 / 342rpx 240rpx no-repeat;
			padding: 20rpx 24rpx;
			width: 342rpx;
			height: 240rpx;
			border-radius: 12rpx;
			overflow: hidden;

			.cart-large-name {
				font-size: 28rpx;
				color: #333;
			}
		}

		.section-right {
			width: 342rpx;
			height: 240rpx;
			background: #fff;
			border-radius: 12rpx;
			overflow: hidden;

			.cart-item {
				display: flex;
				-webkit-box-pack: justify;
				justify-content: space-between;
				-webkit-box-align: center;
				align-items: center;
				width: 294rpx;
				height: 80rpx;
				margin: 0 auto;
				border-bottom: 1rpx solid #efefef;

				.cart-item-name {
					font-size: 28rpx;
					color: #333;
				}

				.cart-item-desc {
					font-size: 22rpx;
					color: #999;
					align-items: center;
					display: flex;

					image {
						height: 18rpx;
						width: 10rpx;
						margin-left: 7rpx;
					}
				}
			}
		}
	}
</style>